<html>
<head><meta charset="utf-8"><title>breaking changes to lsp-server · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/breaking.20changes.20to.20lsp-server.html">breaking changes to lsp-server</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="217556346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/breaking%20changes%20to%20lsp-server/near/217556346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/breaking.20changes.20to.20lsp-server.html#217556346">(Nov 22 2020 at 15:31)</a>:</h4>
<p>Hello !<br>
I made a PR with breaking changes to <code>lsp-server</code> which means I cannot update <code>rust-analyzer</code> to show it works before the new version is published on <a href="http://crates.io">crates.io</a> (if the PR is accepted), should I just ensure it works locally with a path dependency ?</p>



<a name="217562305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/breaking%20changes%20to%20lsp-server/near/217562305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/breaking.20changes.20to.20lsp-server.html#217562305">(Nov 22 2020 at 18:04)</a>:</h4>
<p>You could make the PR with a git dependency. I don't know about your change though; in general the client should be assumed to work correctly, and it doesn't make sense to make the server resilient against bad messages. It can even be better if it crashes early since you might otherwise miss bugs.</p>
<p>I think in your particular case, <code>lsp-types</code> might be wrong though? According to <a href="https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_didSave">https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_didSave</a>, the <code>textDocument</code> field should be a <code>TextDocumentIdentifier</code> which doesn't have a version field, but in <code>lsp-types</code> it's a <a href="https://github.com/gluon-lang/lsp-types/blob/207766153e54a56f33a1fbaab71837277638fdec/src/lib.rs#L1959"><code>VersionedTextDocumentIdentifier</code></a></p>



<a name="217564191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/breaking%20changes%20to%20lsp-server/near/217564191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/breaking.20changes.20to.20lsp-server.html#217564191">(Nov 22 2020 at 18:51)</a>:</h4>
<p>I’ll see about changing that later to see if it fixes the problem for me</p>



<a name="217649394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/breaking%20changes%20to%20lsp-server/near/217649394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jeremy Kolb <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/breaking.20changes.20to.20lsp-server.html#217649394">(Nov 23 2020 at 16:22)</a>:</h4>
<p>For those silent lurkers out there it looks like the spec was reverted and <span class="user-mention" data-user-id="307289">@Poliorcetics</span> made an awesome PR to go with it: <a href="https://github.com/gluon-lang/lsp-types/pull/188">https://github.com/gluon-lang/lsp-types/pull/188</a></p>



<a name="217757255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/breaking%20changes%20to%20lsp-server/near/217757255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jeremy Kolb <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/breaking.20changes.20to.20lsp-server.html#217757255">(Nov 24 2020 at 14:03)</a>:</h4>
<p>merged</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>